package cn.dujc.superkid.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * 题目
 * @author du
 * date 2018/7/28 下午10:41
 */
public class SubjectEntity implements Parcelable {

    /**
     * id : 70499
     * genre : 1
     * question_type : 3
     * question_id : 4251
     * question_nav : 一年级知识点 > 应用题 > 摸彩球 > 例1-可能性大小
     * question_title : <p>小丽想不摸到蓝色珠子，请问她应该摸第________个盒子？</p><p><img src="http://7xu137.com1.z0.glb.clouddn.com/ueditor_20161213_584f624e3905b.png" title="blob.png" alt="blob.png"/></p>
     * exercises_answer : [""]
     * correct_answer : ["3"]
     * explain_ex : <p>第3个盒子里没有蓝色珠子，所以不会摸到蓝色的珠子</p>
     * subtime : 1512663287
     * good_key : VxUJQFEMAQE
     */

    private String id;//好题记录id
    private String genre;//题目类型(1-练习题，2-自测卷，3-考试，4-杯赛考试)
    private String question_type;//问题类型(1,单选，2-多选，3-填空)
    private String question_id;//问题id
    private String question_nav;//问题所属分类
    private String question_title;//问题标题
    private String explain_ex;//题目解析
    private String subtime;//记录时间戳
    private String good_key;//好题本key（重做时验证）
    private List<String> exercises_answer;//全部答案
    private List<String> correct_answer;//正确答案（如果为选择题时，3表示c）
    /**
     * wrong : 2
     * wrong_key : VxUJRlUBCgg
     */
    private String wrong;//错误答案
    private String wrong_key;//错题本key（重做时验证）

    public String getId() { return id;}

    public void setId(String id) { this.id = id;}

    public String getGenre() { return genre;}

    public void setGenre(String genre) { this.genre = genre;}

    public String getQuestion_type() { return question_type;}

    public void setQuestion_type(String question_type) { this.question_type = question_type;}

    public String getQuestion_id() { return question_id;}

    public void setQuestion_id(String question_id) { this.question_id = question_id;}

    public String getQuestion_nav() { return question_nav;}

    public void setQuestion_nav(String question_nav) { this.question_nav = question_nav;}

    public String getQuestion_title() { return question_title;}

    public void setQuestion_title(String question_title) { this.question_title = question_title;}

    public String getExplain_ex() { return explain_ex;}

    public void setExplain_ex(String explain_ex) { this.explain_ex = explain_ex;}

    public String getSubtime() { return subtime;}

    public void setSubtime(String subtime) { this.subtime = subtime;}

    public String getGood_key() { return good_key;}

    public void setGood_key(String good_key) { this.good_key = good_key;}

    public List<String> getExercises_answer() { return exercises_answer;}

    public void setExercises_answer(List<String> exercises_answer) { this.exercises_answer = exercises_answer;}

    public List<String> getCorrect_answer() { return correct_answer;}

    public void setCorrect_answer(List<String> correct_answer) { this.correct_answer = correct_answer;}

    public String getWrong() { return wrong;}

    public void setWrong(String wrong) { this.wrong = wrong;}

    public String getWrong_key() { return wrong_key;}

    public void setWrong_key(String wrong_key) { this.wrong_key = wrong_key;}

    @Override
    public int describeContents() { return 0; }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.id);
        dest.writeString(this.genre);
        dest.writeString(this.question_type);
        dest.writeString(this.question_id);
        dest.writeString(this.question_nav);
        dest.writeString(this.question_title);
        dest.writeString(this.explain_ex);
        dest.writeString(this.subtime);
        dest.writeString(this.good_key);
        dest.writeStringList(this.exercises_answer);
        dest.writeStringList(this.correct_answer);
        dest.writeString(this.wrong);
        dest.writeString(this.wrong_key);
    }

    public SubjectEntity() {}

    protected SubjectEntity(Parcel in) {
        this.id = in.readString();
        this.genre = in.readString();
        this.question_type = in.readString();
        this.question_id = in.readString();
        this.question_nav = in.readString();
        this.question_title = in.readString();
        this.explain_ex = in.readString();
        this.subtime = in.readString();
        this.good_key = in.readString();
        this.exercises_answer = in.createStringArrayList();
        this.correct_answer = in.createStringArrayList();
        this.wrong = in.readString();
        this.wrong_key = in.readString();
    }

    public static final Creator<SubjectEntity> CREATOR = new Creator<SubjectEntity>() {
        @Override
        public SubjectEntity createFromParcel(Parcel source) {return new SubjectEntity(source);}

        @Override
        public SubjectEntity[] newArray(int size) {return new SubjectEntity[size];}
    };
}
